Skip to content

Enforce config.json presence when userConfig is enabled#44

Open
Cleboost wants to merge 2 commits intomasterfrom
fix/enforce-config-json-presence-6806745962639474455
Open

Enforce config.json presence when userConfig is enabled#44
Cleboost wants to merge 2 commits intomasterfrom
fix/enforce-config-json-presence-6806745962639474455

Conversation

@Cleboost
Copy link
Copy Markdown
Owner

The PR addresses the user's request to strictly check for the presence of config.json at startup.

Key changes:

  1. Development Mode (packages/dev/utils/common.ts): Modified runBot to log an error and exit if config.json is missing or invalid when userConfig is enabled.
  2. Build Mode (packages/dev/commands/build.ts):
    • Updated the generated bot's entry point template to exit with an error at runtime if the configuration file is missing.
    • Updated the build-time file-copying logic to fail the build if config.json cannot be copied to the dist/ directory.

These changes prevent the framework from defaulting to a state where a user-expected configuration is silently ignored.

Fixes #40


PR created automatically by Jules for task 6806745962639474455 started by @Cleboost

Updated `runBot` and `build` commands to exit with an error (`process.exit(1)`)
if `config.json` is missing or invalid when `experimental.userConfig` is enabled.
This ensures that the bot does not start in an inconsistent state when a
required configuration file is not provided.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@google-labs-jules google-labs-jules bot mentioned this pull request Mar 26, 2026
- Modified `runBot` and `build` commands to exit with `process.exit(1)`
  if `config.json` is missing or invalid when required.
- Fixed Biome linting issues by using template literals and prefixing
  unused catch variables.
- Fixed Biome formatting in `packages/dev/utils/common.ts`.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check config.json

1 participant